<?php

class Dcmp_Component_Result_History extends Dcmp_Component_Result_Base {

    private $_actionPath = '';

    public function getActionPath(){
        return $this->_actionPath;
    }
    public function setActionPath($value){
        $this->_actionPath = $value;
        return $this;
    }
    
    public function getInfom(){
    	return $this->_informs;
    }
    public function setInform($value){
    	$this->_inform = $value;
    	return $this;
    }
    
    public function getError(){
    	return $this->_error;
    }
    public function setError($value){
    	$this->_error = $value;
    	return $this;
    }

    public function execute(){
    	if(!is_null($this->_inform)){
    		Kd_Web::getMessager()->addInform($this->_inform);
    	}
       	if(!is_null($this->_error)){
    		Kd_Web::getMessager()->addError($this->_error);
    	}    	
        Kd_Web::getResponse()->redirect(Kd_Web::getHistory()->get($this->getActionPath()));
    }
}